package com.ali.sofa.controller;

import com.ali.sofa.domain.Person;
import jakarta.websocket.server.PathParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
public class HelloRestController {

    Logger logger = LoggerFactory.getLogger(HelloRestController.class);

    @Autowired
    Person person;

    @RequestMapping("/hello")
    public String hello(){
        logger.warn("我来了");
        return "hello my first springboot3 demo";
    }

    @RequestMapping("/person")
    public Person person(String name){
        person.setName(name);
        return person;
    }
}
